﻿<phone:PhoneApplicationPage x:Class="TaxiPlease.MainPage"
                            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                            xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
                            xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
                            xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
                            xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                            FontFamily="{StaticResource PhoneFontFamilyNormal}"
                            FontSize="{StaticResource PhoneFontSizeNormal}"
                            Foreground="{StaticResource PhoneForegroundBrush}"
                            SupportedOrientations="PortraitOrLandscape"
                            Orientation="Portrait"
                            mc:Ignorable="d"
                            xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                            d:DesignHeight="800"
                            d:DesignWidth="480">
    <Grid>
        <controls:Panorama Background="Black">

            <controls:PanoramaItem Header="Taxi Please!">
                <StackPanel>
                    <Button Content="SMS повикване"
                            Command="{Binding SendMessageCommand}" />
                    <Button Content="Обаждане"
                            Command="{Binding SendMessageCommand}" />
                </StackPanel>
            </controls:PanoramaItem>

            <controls:PanoramaItem Header="Taxi Services"
                                   DataContext="{Binding TaxiServices}">
                <ListBox ItemsSource="{Binding Services}">
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <StackPanel Orientation="Horizontal">
                                <CheckBox Content="Default"
                                          IsChecked="{Binding IsDefault}" />
                                <StackPanel>
                                    <TextBlock Text="{Binding Name}"
                                               Margin="5" />
                                    <TextBlock Text="{Binding PhoneNumber}" />
                                </StackPanel>
                            </StackPanel>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>
            </controls:PanoramaItem>

            <controls:PanoramaItem Header="New Service"
                                   DataContext="{Binding NewTaxiService}">
                <StackPanel>
                    <TextBlock Text="Name" />
                    <TextBox Text="{Binding Name, Mode=TwoWay}" />
                    <TextBlock Text="Sms Pattern" />
                    <TextBox Text="{Binding SmsPattern, Mode=TwoWay}"
                             Margin="10 2"
                             TextWrapping="Wrap"
                             AcceptsReturn="True"
                             Height="200" />
                    <TextBlock Text="Phone" />
                    <TextBox Text="{Binding PhoneNumber, Mode=TwoWay}"
                             Margin="10 2" />
                    <CheckBox Content="Default"
                              Margin="10 2"
                              IsChecked="{Binding IsDefault, Mode=TwoWay}" />
                </StackPanel>
            </controls:PanoramaItem>
        </controls:Panorama>
    </Grid>
</phone:PhoneApplicationPage>